package com.grouppurchase.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@ApiModel("创建团购DTO")
public class GroupCreateDTO {

    @ApiModelProperty(value = "商品ID", required = true, example = "1")
    @NotNull(message = "商品ID不能为空")
    private Long productId;

    @ApiModelProperty(value = "成团目标人数", required = true, example = "5")
    @NotNull(message = "成团人数不能为空")
    @Min(value = 2, message = "成团人数最少为2人")
    private Integer targetSize;
}
